{% extends "layout/manage.html" %}
{% load static %}
{% block title %}数据爬取{% endblock %}
{% block css %}
    <style>
        .slogan {
            font-size: 20px;
            margin: 10px;
            color: #00FF00;
            font-weight: bold;
        }
    </style>
{% endblock %}
{% block content %}
    <form class="form-inline" style="text-align: center" method="get" action="{% url 'websass:keyword_crawl' project_id=request.tracer.project.id %}">
        <div class="slogan">基金排行数据</div>
        <div class="form-group">
            <div class="input-group">
                <div class="input-group-addon">关键字</div>
                <input name="str" class="form-control"
                       placeholder="爬取关键字" style="width: 600px">
                <div class="input-group-btn">
                    <input type="submit" value="搜索" class="btn btn-primary">
                </div>
            </div>
        </div>
    </form>
    <table class="table">
            <thead>
            <tr>
                <th>序号</th>
                <th>基金代码</th>
                <th>基金名称</th>
                <th>日期</th>
                <th>单位净值</th>
                <th>累计净值</th>
                <th>日增长率</th>
                <th>近1周</th>
                <th>近1月</th>
                <th>近3月</th>
                <th>近6月</th>
                <th>近一年</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody id="rowList">
            {% for data in data_list %}
                <tr>
                    <td>
                        {{ data.serial }}
                    </td>
                    <td>
                        {{ data.fund_code }}
                    </td>
                    <td>{{ data.fund_name }}</td>
                    <td>{{ data.f_datetime }}</td>
                    <td>{{ data.f_value }}</td>
                    <td>
                        {{ data.f_net_value }}
                    </td>
                    <td>
                        {{ data.day_growth }}
                    </td>
                    <td>{{ data.week }}</td>
                    <td>{{ data.january }}</td>
                    <td>{{ data.march }}</td>
                    <td>{{ data.six_month }}</td>
                    <td>{{ data.year }}</td>
                    <td><a href="#">进入？</a></td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
    </div>
</div>
{% endblock %}
{% block js %}{% endblock %}